package com.dingding.manager.modules.order.dto;

import java.io.Serializable;

import com.dingding.manager.modules.order.enums.OrderStatus;

/**
 * 
 * @ClassName: ReqOrderDTO 
 * @Description: TODO
 * @author hufan
 * @date 2016年12月8日 上午9:56:03 
 *
 */
public class ReqOrderDTO implements Serializable{
	
	private static final long serialVersionUID = 4237509360972772688L;
	
	private Integer proviceId;//省份
	private Integer cityId;//城市	
	private Integer companyId;//公司id
	private Integer orderStatus;//状态 1:待指派 2:待上车(已指派)3:已上车4:待支付(已到达) 5:已完成 6:已取消
	
	private String timeEnd;//下单结束日期	
	private String timeStart;//下单开始日期
	
	private Integer start;//起始数据
	private Integer length;//每页显示多少条数据
	
	private OrderStatus status;//
	
	private String nameOrPhone;//姓名或者手机号
	private String address;//出发地或者目的地
	
	public ReqOrderDTO() {}
	
	public ReqOrderDTO(Integer proviceId,Integer cityId,Integer companyId,Integer orderStatus,
			String timeEnd,String timeStart,Integer start,Integer length,String nameOrPhone,
			String address){
		this.proviceId = proviceId;
		this.cityId = cityId;
		this.companyId = companyId;
		this.orderStatus = orderStatus;
		this.timeEnd = timeEnd;
		this.timeStart = timeStart;
		this.start = start;
		this.length = length;
		this.nameOrPhone = nameOrPhone;
		this.address = address;
	}
	
	public Integer getProviceId() {
		return proviceId;
	}
	public void setProviceId(Integer proviceId) {
		this.proviceId = proviceId;
	}
	public Integer getCityId() {
		return cityId;
	}
	public void setCityId(Integer cityId) {
		this.cityId = cityId;
	}
	public Integer getCompanyId() {
		return companyId;
	}
	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}
	public Integer getOrderStatus() {
		return orderStatus;
	}
	public void setOrderStatus(Integer orderStatus) {
		this.orderStatus = orderStatus;
	}
	public String getTimeEnd() {
		return timeEnd;
	}
	public void setTimeEnd(String timeEnd) {
		this.timeEnd = timeEnd;
	}
	public String getTimeStart() {
		return timeStart;
	}
	public void setTimeStart(String timeStart) {
		this.timeStart = timeStart;
	}
	public Integer getStart() {
		return start;
	}
	public void setStart(Integer start) {
		this.start = start;
	}
	public Integer getLength() {
		return length;
	}
	public void setLength(Integer length) {
		this.length = length;
	}
	public OrderStatus getStatus() {
		OrderStatus status = null;
		if(orderStatus != null) {
			if(orderStatus == OrderStatus.ALL.ordinal()) {
				status = OrderStatus.ALL;
			}else if(orderStatus == OrderStatus.INSERVICE.ordinal()) {
				status = OrderStatus.INSERVICE;
			}else if(orderStatus == OrderStatus.COMPLETED.ordinal()) {
				status = OrderStatus.COMPLETED;
			}else if(orderStatus == OrderStatus.WAITPAY.ordinal()) {
				status = OrderStatus.WAITPAY;
			}else if(orderStatus == OrderStatus.CANCELED.ordinal()) {
				status = OrderStatus.CANCELED;
			}
		}
		
		return status;
	}
	public void setStatus(OrderStatus status) {
		this.status = status;
	}

	public String getNameOrPhone() {
		return nameOrPhone;
	}

	public void setNameOrPhone(String nameOrPhone) {
		this.nameOrPhone = nameOrPhone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
}
